<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<meta name="viewport" content="width=1000, initial-scale=1.0, maximum-scale=1.0">
	    <!-- Loading Bootstrap -->
	    <link href="./Public/Admin/Flat/dist/css/vendor/bootstrap.min.css" rel="stylesheet">
	    <!-- Loading Flat UI -->
	    <link href="./Public/Admin/Flat/dist/css/flat-ui.css" rel="stylesheet">
	    <link href="./Public/Admin/Flat/docs/assets/css/demo.css" rel="stylesheet">
	    <link rel="shortcut icon" href="./Public/Admin/Flat/img/favicon.ico">
	    <!-- HTML5 shim, for IE6-8 support of HTML5 elements. All other JS at the end of file. -->
	    <!--[if lt IE 9]>
	      <script src="dist/js/vendor/html5shiv.js"></script>
	      <script src="dist/js/vendor/respond.min.js"></script>
	    <![endif]-->
	    <!--<script src="View/jquery-1.8.2.min.js" type="text/javascript" charset="utf-8"></script>-->
		<!--<script type="text/javascript">
			$(function(){
				alert();
				//表单提交事件
				$('#form').submit(function(){
					//一次可以抓取到整个表单的所有内容
					var data = $(this).serialize();
					$.ajax({
						type:"post",
						url:"index.php?a=add",
						data:data,
						//指定服务器返回的数据类型
						dataType:'json',
						success:function(phpData){
							//phpData相当于{title:'标题',content:'内容'}
							var html = "<tr>";
							html += "<td>"+phpData.id+"</td>";
							html += "<td>"+phpData.title+"</td>";
							html += "<td>"+phpData.content+"</td>";
							html += "<td><a href='' class='btn btn-info btn-sm'>编辑</a> <a href='' class='btn btn-danger btn-sm'>删除</a></td></tr>";
							$('table').append(html);
							//清掉已有内容
							$('form')[0].reset();
						}
					});
				})
			})
		</script>-->
	</head>
	<body>
		<table class="table table-hover">
			<tr class="active">
			  <th width="100">sid</th>
			  <th width="150">商品名称</th>
			  <th width="150">商城价格</th>
			  <th width="150">市场价格</th>
			  <th width="180">库存</th>
			  <th width="200">操作</th>
			</tr>
			<?php foreach ($data as $v){?>
			<tr>
				<td><?php echo $v['sid']?></td>
				<td><?php echo $v['sname']?></td>
				<td><?php echo $v['shop']?></td>
				<td><?php echo $v['market']?></td>
				<td><?php echo $v['stock']?></td>
				<td>
					<a href="<?php echo U('Shop_list/index',array('sid'=>$v['sid']))?>" class="btn btn-sm btn-primary">货品列表</a>
					<a href="<?php echo U('edit',array('sid'=>$v['sid']))?>" class="btn btn-sm btn-warning">编辑</a>
					<a href="javascript:if(confirm('确定删除吗？')) location.href='<?php echo U('del',array('sid'=>$v['sid']))?>';" class="btn btn-sm btn-danger">删除</a>
				</td>
			</tr>
			<?php }?>
		</table>
		<!--<style type="text/css">
			#self-page ul.pagination li{
				background: #ccc;
				margin-left: 3px;
			}
		</style>
		<center id="self-page">
			<ul class="pagination">
				<?php echo $page?>
			</ul>
		</center>-->
	</body>
</html>
